1. Technical Field
The present invention relates to a method and apparatus for measuring a magnetic offset of a geomagnetic sensor equipped in a portable information terminal apparatus.
2. Background Art
In the case of a conventional geomagnetic sensor, when mounted inside a portable telephone (portable information terminal), because of the presence of magnetic fields leaking from a speaker, a metal package of magnetized electronic components, and so on that are mounted together, the geomagnetic sensor detects even those noise magnetic fields generated by them. As a result, there have been instances where, in a portable telephone that detects the geomagnetism by a geomagnetic sensor mounted therein, an azimuth calculated on the basis of a magnetic field existing inside the portable telephone does not indicate a correct azimuth.
For example, in a portable telephone mounted with a geomagnetic sensor having sensitivity directions along two axes (X- and Y-axis directions) perpendicular to each other and having sensitivities equal to each other in the respective directions, given that an angle formed between a vector of the geomagnetism and the X-axis is θ, a detection value Vx of the geomagnetic sensor in the X-axis direction and a detection value Vy of the geomagnetic sensor in the Y-axis direction are obtained as outputs in the state where offset m and n corresponding to magnetization amounts in the X- and Y-axis directions, respectively, are added as expressed by (formula 1) and (formula 2), respectively, due to a noise magnetic field existing inside the portable telephone.Vx=R×cos θ+m  (formula 1)Vy=R×sin θ+n  (formula 2)
(where R is a proportional constant)
That is, when a non-magnetized geomagnetic sensor disposed at a certain fixed place rotates in the state where there is no change in geomagnetism, i.e. a constant external magnetic field is applied, detection values of the geomagnetic sensor draw a real circle having center coordinates (0, 0). Hereinafter, a circle drawn by detection values of a geomagnetic sensor will be referred to as an compass circle. On the other hand, when a magnetized geomagnetic sensor is rotated, detection values of the geomagnetic sensor a real circle having center coordinates (m, n) as shown in FIG. 21. Use is made of a method wherein the center coordinates of the compass circle are derived to thereby equivalently derive magnetization amounts magnetized on the geomagnetic sensor and, by calculation of subtracting the center coordinate values (correction values) from detection values of the geomagnetic sensor, the detection values are corrected to thereby derive a correct azimuth.
Specifically, offsets of the center coordinate values are first derived. For example, when the geomagnetic sensor is caused to make a turn in the plane including the sensitivity directions, while being kept horizontal, to thereby derive detection values of the geomagnetic sensor in the X-axis and Y-axis directions with respect to all the directions, and maximum values and minimum values of these detection values are given as Xmax, Ymax and Xmin and Ymin, respectively, the offset center coordinates (m, n) are derived by the following formulas.m=(Xmax+Xmin)/2  (formula 3)n=(Ymax+Ymin)/2  (formula 4)
Otherwise, with respect to detection values (X1, Y1) obtained when the geomagnetic sensor is moved to a predetermined position A and output values (X2, Y2) obtained when the geomagnetic sensor is moved therefrom to a position D located in a 180° opposite direction while being kept horizontal, the center coordinates (m, n) are derived by the following formulas as the mean values thereof.m=(X1+X2)/2  (formula 5)n=(Y1+Y2)/2  (formula 6)
Then, the offset center coordinate values are subtracted by calculation to make correction. On the basis of the thus derived center coordinates (m, n), and a detection value Vx of the geomagnetic sensor in the X-axis direction and a detection value Vy of the geomagnetic sensor in the Y-axis direction, an azimuth angle θ is derived by the following formula.When |Vy−n|<|Vx−m| and Vx−m>0, θ=tan−1((Vy−n)/(Vx−m))  (formula 7).When |Vy−n|>|Vx−m| and Vy−n>0, θ=90[deg]−tan−1((Vx−m)/(Vy−n))  (formula 8).When |Vy−n|<|Vx−m| and Vx−m<0, θ=180[deg]−tan−1((Vy−n)/(Vx−m))  (formula 9).When |Vy−n|>|Vx−m| and Vy−n<0, θ=270[deg]−tan−1((Vx−m)/(Vy−n))  (formula 10).
However, in the foregoing conventional geomagnetic sensor correction method, since the magnetization state of the geomagnetic sensor always changes, it is necessary for a user to cause the portable telephone to make one or more turns in order to derive maximum values and minimum values of detection values of the geomagnetic sensor every time the geomagnetic sensor is considered to have been magnetized. There has been a problem that it is difficult, in particular, to cause the portable telephone to make one or more turns while keeping it horizontal so that there is a possibility of the portable telephone being dropped once in a while and, even with no occurrence of the portable telephone being dropped, variation occurs in obtained data so that an offset cannot be derived accurately. Therefore, there has also been a problem that the foregoing conventional geomagnetic sensor correction method is unsuitable for portable devices.
In view of this, Patent Document 1, for example, describes an electronic azimuth finder wherein magnetic field judging means judges whether or not the strength of a magnetic field detected by a magnetic sensor is outside a predetermined range and, when it is outside the range, judges that the magnetic sensor is magnetized, and the magnetized magnetic sensor is demagnetized by applying thereto an alternating damping magnetic field by the use of a coil that applies a bias magnetic field to the magnetic sensor in measurement. However, although the technique according to this publication can demagnetize, inside the electronic azimuth finder, a magnetic field generated by one, for example, a permanent magnet, that generates a magnetic field in a constant direction with respect to a direction of the electronic azimuth finder regardless of a direction of the geomagnetism, it cannot demagnetize an induction magnetic field that is generated by a soft magnetic body being a ferromagnetic body which can be magnetized or demagnetized relatively easily, for example, a lead of an electronic component, when the electronic azimuth finder moves in the geomagnetism. Therefore, the foregoing problem cannot be solved.
On the other hand, Patent Document 2 describes an azimuth detection device that judges whether or not a signal input into arithmetic means from a geomagnetic sensor deviates from a predetermined judgment zone, to thereby recognize, without rotation, that the magnetization amount of the geomagnetic sensor is large, and gives warning about it. However, the technique according to this publication detects that the magnetization amount of the magnetic sensor is large and gives warning, but does not disclose a specific technique about correction of output and therefore cannot solve the foregoing problem.
On the other hand, Patent Document 3 describes a magnetism detection method wherein, in advance, detection values of a magnetic sensor with respect to a predetermined uniform magnetic field are adjusted to certain values in the state where the foregoing soft magnetic body is not present in the neighborhood and then a correction coefficient is derived from detection values obtained when there is a magnetic field from a direction of magnetism-sensitive axis in the state where the soft magnetic body is present in the neighborhood and, by canceling an induction magnetic field generated around the soft magnetic body by the use of a predetermined calculation formula on the basis of the correction coefficient, an output caused by the foregoing induction magnetic field is corrected. However, the technique according to this publication does not disclose a specific technique about what situation requires the correction or what timing the correction is performed, and therefore cannot solve the foregoing problem.
On the other hand, Patent Document 4 describes an adjusting method for an electronic azimuth finder, wherein a magnetic field for adjustment is generated while changing the strength thereof according to a predetermined sequence by the use of a magnetic field generator that can generate a magnetic field stronger than the geomagnetism and adjusting data is obtained using a sequence that obtains data or a magnetic sensor according to the predetermined sequence, thereby performing an adjustment. However, there has been a problem that the technique according to this publication requires, apart from the electronic azimuth finder, the magnetic field generator that applies the external magnetic field.
Aside, Patent Document 5 describes a calibration method of the magnetic sensor mounted in the portable terminal. In this technique, a portable terminal is rotated per predetermined angle and, based on data measured by a magnetic sensor at respective angles, an offset is estimated to thereby carry out calibration without depending on the rotation speed. However, even in the method described in Patent Document 5, it is necessary for a user to consciously rotate the portable device mounted with the magnetic sensor to thereby perform calibration thereof. Therefore, although improved as compared with conventional, since the user is forced to carry out the operation for calibration, it still remains troublesome to the user. Further, if the user neglects or forgets the calibration, the geomagnetic sensor cannot be operated in an optimal state.
[Patent Document 1]
Unexamined Patent Publication No. Hei 6-174472
[Patent Document 2]
Unexamined Patent Publication No. Hei 6-249663
[Patent Document 3]
Unexamined Patent Publication No. Hei 7-151842
[Patent Document 4]
Unexamined Patent Publication No. 2002-48551
[Patent Document 5]
Unexamined Patent Publication No. 2004-12416